package cn.MaySoon.zhuansheng;

import org.bukkit.entity.Player;
import org.serverct.ersha.api.AttributeAPI;
import org.serverct.ersha.attribute.data.AttributeData;
import org.serverct.ersha.attribute.data.AttributeSource;

import java.util.List;

public class AP {
    public static void updatePlayerAttribute(Player p){
            zhuansheng zhuansheng = main.PlayerZhaunSheng.get(p);
        List<String> attribute = main.config.getStringList("zhuansheng."+zhuansheng.getLevel()+".attr");
        AttributeData data = AttributeAPI.getAttrData(p);
        AttributeAPI.addSourceAttribute(data,"zhuansheng",attribute,false);
      AttributeSource source = AttributeAPI.getAttributeSource(attribute,false);
        main.PlayerAttribute.put(p,source);
    }


}
